﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <link rel="stylesheet" type="text/css" href="~/H-ui/static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="~/H-ui/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="~/H-ui/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="~/H-ui/static/h-ui.admin/skin/green/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="~/H-ui/static/h-ui.admin/css/style.css" />
    <title>ShowAppraise</title>
    <link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"></script>
    <link href="~/bootstrap-star-rating-master/css/star-rating.css" media="all" rel="stylesheet" type="text/css" />
    <script src="~/bootstrap-star-rating-master/js/star-rating.js" type="text/javascript"></script>
<link href="~/ystep-master/css/ystep.css" rel="stylesheet" />
    <link href="~/css/img.css" rel="stylesheet" />

</head>
<body class="bb1">
  
    <div align=center class="d1">
        <marquee style="FONT-SIZE: 35pt; WIDTH: 400px; FILTER: shadow(color=#AF0530); LINE-HEIGHT:15pt; FONT-FAMILY: 隶书; HEIGHT: 80px" scrollamount=6>
            <h2 style="margin-top:0px;text-align:center"><font color=#f90b46>我的评价 </font></h2>
        </marquee>
    </div>

    <div>
        <table class="table table-border table-bordered table-hover">
            <tr>
                <td>报修名称：</td>
                <td width="150px">@Model.RepairsName</td>
                <td>报修时间：</td>
                <td width="200px">@Model.FindDate</td>
                <td>问题发现人：</td>
                <td width="200px">@Model.FindPeople</td>
            </tr>
            <tr>
                <td>审批状态：</td>
                <td colspan="5">
                    <div class="ystep1"></div>
                </td>
            </tr>
            <tr>
                <td>维修状态：</td>
                <td colspan="5">
                    <div class="ystep2"></div>
                </td>
            </tr>
            <tr>
                <td>审批质量评定：</td>
                <td colspan="5">
                    <input id="shu" type="number" class="rating" min="0" max="5" step="0.5" data-size="xl"
                           data-symbol="&#xe005;" data-default-caption="{rating} hearts" data-star-captions="{}">
                </td>
            </tr>
            <tr>
                <td>我的评价：</td>
                <td colspan="5">
                    <textarea id="TextArea1" rows="4" cols="30">@Model.comments</textarea>
                </td>
            </tr>
            <tr>
                <td colspan="6"><input type="button" value="提交" class="btn btn-success" onclick="aa()" /></td>
            </tr>
        </table>
        <input type="text" value="@Model.choice" id="txtc" hidden />
    </div>
    <footer class="footer mt-20">
        <div class="container">
            <p>
                关于我们  |  联系我们    |  项目合作  |  广告植入   |  友情链接<br />
                版权所有 京ICP备11009069<br />
                Copyright ©2016 Gaotie.cn
            </p>
        </div>
    </footer>
    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="~/H-ui/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/H-ui/lib/layer/2.4/layer.js"></script>
    <script type="text/javascript" src="~/H-ui/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/H-ui/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->
    <script type="text/javascript" src="lib/jquery.contextmenu/jquery.contextmenu.r2.js"></script>
    <!-- 引入jquery -->
    <script src="~/ystep-master/js/jquery.min.js"></script>
    <!-- 引入ystep插件 -->
    <script src="~/ystep-master/js/ystep.js"></script>
    <script>
        liuc();
        function liuc()
        {
            $("#shu").val(@Html.Raw(Model.star))
            var state=@Html.Raw(Model.ExamineState);                                 
            var WXstate=@Html.Raw(Model.MaintainState);
            var choice=$("#txtc").val();
            //根据jQuery选择器找到需要加载ystep的容器
            //loadStep 方法可以初始化ystep
            $(".ystep1").loadStep({
                //ystep的外观大小
                //可选值：small,large
                size: "small",
                //ystep配色方案
                //可选值：green,blue
                color: "green",
                //ystep中包含的步骤
                steps: [{
                    //步骤名称
                    title: "已提交",
                    //步骤内容(鼠标移动到本步骤节点时，会提示该内容)
                    content: "！！！！"
                }, {
                    title: "科长已审批",
                    content: choice
                }, {
                    title: "局长已审批,完成!",
                    content: "审批完成哦！"
                }]
            });
            $(".ystep2").loadStep({
                size: "large",
                color: "green",
                steps: [{
                    title: "已接单",
                    content: "！！！！"
                },{
                    title: "维修中",
                    content: "正在维修请稍等哦！"
                },{
                    title: "维修完成!",
                    content: "维修成功，可以使用哦！"
                }]
            });
            $(".ystep1").setStep(state);
            $(".ystep2").setStep(WXstate);
        }
    function aa()
    {
        var star=$("#shu").val()
        var comments=$("#TextArea1").val()
        var id=@Html.Raw(Model.RepairsId);
        $.ajax({
            type:"post",
            url:"/Repairs/pingjia",
            data:{star:star,comments:comments,id:id},
            success:function(data)
            {
                if(data)
                {
                    alert("评价成功");
                    location.href='/Repairs/RepairManage';
                }
                else
                    alert("评价失败");
            }
        })

    }
</script>
</body>
</html>
